﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="GroupList.aspx.cs" Inherits="UI.ModSystem.GroupList" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>自定义组列表</title>
      <link rel="stylesheet" type="text/css" href="../Styles/BaseStyle.css" />
    <script type="text/javascript" src="../JS/jsFunction.js"></script>
    <script src="../JS/calendar.js" type="text/javascript"></script> 
    <script type="text/javascript">
        function aclose(groupID, gName, gProfile, gType, account) {
            this.document.forms[0].hidGroupID.value = groupID;
            this.document.forms[0].txtGName.value = gName;
            this.document.forms[0].txtGProfile.value = gProfile;
            this.document.forms[0].txtGType.value = gType;
            this.document.forms[0].txtAccount.value = account;
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div id="pagetop" class="pagetop">
            <div class="pagetopleft">
                组列表</div>
            <div class="pagetopright">
                名称 <asp:TextBox ID="txtSerWord" runat="server" CssClass="InputCss" Width="75px"></asp:TextBox>
               
                <asp:Button ID="btnEmSearch" runat="server" Text="查询" OnClick="btnEmSearch_Click"
                    CssClass="ButtonCss" />
              

                <asp:Button ID="btnExcel" runat="server" Text="导出" CssClass="ButtonCss" OnClick="btnExcel_Click" />
              
                &nbsp;
            </div>
        </div>
        <div id="ear">
    <table style="width: 95%;" align="center" class="td">
        <tr>
            <td style="width: 50px;">
                组名称
            </td>
            <td>
                <asp:TextBox ID="txtGName" runat="server" CssClass="InputCss" Width="100px"
                    onkeydown="if(event.keyCode==13)event.keyCode=9"></asp:TextBox><asp:HiddenField ID="hidGroupID"
                        runat="server" />
            </td>
       
            <td style="width: 50px;">
               描述
            </td>
            <td>
                <asp:TextBox ID="txtGProfile" runat="server" CssClass="InputCss" Width="150px"
                    onkeydown="if(event.keyCode==13)event.keyCode=9"></asp:TextBox>
            </td>
       
            <td style="width: 50px;">
                类别 
            </td>
            <td>
                <asp:TextBox ID="txtGType" runat="server" CssClass="InputCss" Width="60px"
                    onkeydown="if(event.keyCode==13)event.keyCode=9"></asp:TextBox>
            </td>
       
            <td style="width: 50px;">
                创建账号 
            </td>
            <td>
                <asp:TextBox ID="txtAccount" runat="server" CssClass="InputCss" Width="50px"
                    onkeydown="if(event.keyCode==13)event.keyCode=9"></asp:TextBox>
            </td>
       
           
            <td>
                <asp:Button ID="btnAdd" runat="server" Text="增加" OnClick="btnAdd_Click"   />
        &nbsp;<asp:Button ID="btnUpdate" runat="server" Text="更新" OnClick="btnUpdate_Click" />
        &nbsp;<asp:Button ID="btnDelete" runat="server" Text="删除" OnClick="btnDelete_Click"
            OnClientClick="return confirm('确定要删除吗?\n');" />
        &nbsp;</td>
        </tr>
    </table>
    </div>
          <div id="content">
        <asp:GridView ID="gvList" runat="server" DataKeyNames="GroupID" Width="100%" AutoGenerateColumns="False"
            BackColor="White" BorderColor="#E7E7FF" BorderStyle="None" BorderWidth="1px"
            CellPadding="3" GridLines="Horizontal" OnRowDataBound="gvList_RowDataBound" class="td">
            <Columns>
                <asp:BoundField DataField="GroupID" HeaderText="GroupID" Visible="false" SortExpression="GroupID">
                </asp:BoundField>

 
                     <asp:TemplateField HeaderText="组名称" SortExpression="GName"  >
                <ItemTemplate>
                    <a style="cursor: hand" onclick="javascript:aclose('<%# Eval("GroupID") %>','<%# Eval("GName") %>','<%# Eval("GProfile") %>','<%# Eval("GType") %>','<%# Eval("Account") %>')">                           
                        <%# Eval("GName")%></a>
                </ItemTemplate>
                <ItemStyle Width="100px" />
            </asp:TemplateField>
               <asp:TemplateField HeaderText="描述" SortExpression="GProfile"  >
                <ItemTemplate>
                 <a style="cursor: hand" onclick="javascript:aclose('<%# Eval("GroupID") %>','<%# Eval("GName") %>','<%# Eval("GProfile") %>','<%# Eval("GType") %>','<%# Eval("Account") %>')">                           
                    <%# Eval("GProfile")%></a>
                </ItemTemplate>
                <ItemStyle Width="100px" />
            </asp:TemplateField>
                <asp:BoundField DataField="GType" HeaderText="类别" SortExpression="GType">
                    <ItemStyle Width="70px" />
                </asp:BoundField>
               
                <asp:BoundField DataField="Account" HeaderText="创建账号"   SortExpression="Account">
                    <ItemStyle Width="80px" />
                </asp:BoundField>
                <asp:TemplateField HeaderText="组成员"   >
                <ItemTemplate>
                  <a href="javascript:ShowLink('GroupUser.aspx?GroupID=<%# Eval("GroupID")%>',800,550)">
                       成员列表</a>
                </ItemTemplate>
                <ItemStyle Width="100px" />
            </asp:TemplateField>
            </Columns>
            <FooterStyle BackColor="#B5C7DE" ForeColor="#4A3C8C" />
            <RowStyle BackColor="#E7E7FF" ForeColor="#4A3C8C" />
            <PagerStyle BackColor="#E7E7FF" ForeColor="#4A3C8C" HorizontalAlign="Right" />
            <HeaderStyle BackColor="#4A3C8C" Font-Bold="True" ForeColor="#F7F7F7" />
            <AlternatingRowStyle BackColor="#F7F7F7" />
        </asp:GridView>
         <div id="divAmount" class="amountLine">
        <asp:Label ID="lbAmount" runat="server"></asp:Label>
    </div>
    </div>
    </form>
</body>
</html>
